package com.example.teaching_server.repository;

import com.example.teaching_server.entity.TeachingSubcategory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 教学子分类数据访问层
 */
@Repository
public interface TeachingSubcategoryRepository extends JpaRepository<TeachingSubcategory, Long> {

    /**
     * 根据分类ID查询子分类（按排序号升序排列）
     */
    List<TeachingSubcategory> findByCategoryIdOrderBySortOrderAsc(Long categoryId);
}
